import { queryContries, queryUsers } from "@/services/ant-design-pro/api";

export const userSelectRequest = async () => {
    let result: any = await queryUsers();
    let items: any = [];
    result.data.forEach((val: any) => {
        items.push({ label: val.username + " (" + val.nickname + ")", value: val.username })
    })
    return items;
}

export const userIDSelectRequest = async () => {
    let result: any = await queryUsers();
    let items: any = [];
    result.data.forEach((val: any) => {
        items.push({ label: val.username + " (" + val.nickname + ")", value: val.id })
    })
    return items;
}

export const contrySelectRequest = async () => {
    let result = await queryContries();
    let items: any = [];
    result.data.forEach((val: any) => {
        items.push({ label: val.name + " (最低接单价:" + val.limit_price + ")", value: val.name })
    })
    return items;
}
